<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page isELIgnored="false"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=1.0" />
<title>学生名单</title>
<%@ include file="../common/_head_include.jsp" %>

<style>
select { margin:0px; padding:0px; }
form input, form select, form span { margin:0 6px; padding:0 6px; font-size:1em; }
#pagingNav span { margin:0px 3px 0px 3px; padding: 0px 3px 0px 3px; }
.clickable { cursor:pointer; }
</style>

</head>
<body>
<%@ include file="../common/_page_header.jsp" %>

<div id="g_content"><!-- do NOT change it. It's part of the global page structure. -->

<%@ include file="../common/_page_menubar.jsp" %>

<div id="g_workspace"><!-- do NOT change it. It's part of the global page structure. -->

<h3 style="display:inline">学生名单</h3>
<br/><br/>
<select id="filterProject">
  <option value="" selected="selected">所属项目</option>
</select>
<select id="filterCurrentAidStatus">
  <option value="" selected="selected">当前资助状态</option>
</select>
<input type="text" name="keyword" id="keyword" placeholder="按学生姓名、编号查找"/>
<input type="hidden" id="page" />
<input type="hidden" id="limit" />

<input type="button" id="btnFilter" value="筛选"/>

<span id="bthAdd" class="clickable">登记新学生</span>

<table id="tableStudents" class="simpleDataGrid">
	<thead><tr><th>编号</th><th>姓名</th><th>性别</th><th>登记学期</th><th>登记所在学校</th><th>登记年级</th><th>当期资助状态</th><th>操作</th></tr></thead>
	<tbody>
	</tbody>
</table>
<br/>
<span id="txtCountSummary"></span>
<span id="pagingNav" style="margin-left:30px;"></span>
<br/>

<p id="txtMessage"></p>
<br/>

<div id="studentDialog" title="登记学生信息" class="dialog" style="display:none;">
<form id="studentForm">
	<input type="hidden" name="id" id="id" />
	<br/>
	<label for="projectId">所属项目：</label>
	<select name="projectId" id="projectId"></select><br/>
	<label for="regSemesterId">登记学期：</label>
	<select name="regSemesterId" id="regSemesterId"></select><br/>
	<label for="name">学生姓名：</label>
	<input type="text" name="name" id="name"><br/>
	<label for="gender">学生性别：</label>
	<select name="gender" id="gender"></select><br/>
	<label for="idNumber">身份证号：</label>
	<input type="text" name="idNumber" id="idNumber"><br/>
	<label for="regSchool">登记学校：</label>
	<input type="text" name="regSchool" id="regSchool"><br/>
	<label for="regGradeId">登记年级：</label>
	<select name="regGradeId" id="regGradeId"></select><br/><br/>
	
	<label for="contactPhone">电话：</label>
	<input type="text" name="contactPhone" id="contactPhone"><br/>
	<label for="contactWechat">微信：</label>
	<input type="text" name="contactWechat" id="contactWechat"><br/>
	<label for="contactEmail">邮箱：</label>
	<input type="text" name="contactEmail" id="contactEmail"><br/>
	<label for="contactOther">其他：</label>
	<input type="text" name="contactOther" id="contactOther"><br/><br/>
	
	<label for="suggestAmount">建议资助：</label>
	<input type="text" name="suggestAmount" id="suggestAmount"><br/>
	<label for="description">学生简介：</label><br/>
	<textarea name="description" id="description" rows="5" cols="60"></textarea>
</form>
</div>

<div id="studentEditDialog" title="修改学生信息" class="dialog" style="display:none;">
	<form>
	<input type="hidden" name="id" id="id" />
	<br/>
	<label for="projectId">所属项目：</label>
	<select name="projectId" id="projectId"></select><br/>
	<label for="regSemesterId">登记学期：</label>
	<select name="regSemesterId" id="regSemesterId"></select><br/>
	<label>学生编号：</label>
	<span id="studentSn"></span><br/>
	<label for="name">学生姓名：</label>
	<input type="text" name="name" id="name"><br/>
	<label for="gender">学生性别：</label>
	<select name="gender" id="gender"></select><br/>
	<label for="idNumber">身份证号：</label>
	<input type="text" name="idNumber" id="idNumber"><br/>
	<label for="regSchool">登记学校：</label>
	<input type="text" name="regSchool" id="regSchool"><br/>
	<label for="regGradeId">登记年级：</label>
	<select name="regGradeId" id="regGradeId"></select><br/><br/>

	<label for="contactPhone">电话：</label>
	<input type="text" name="contactPhone" id="contactPhone"><br/>
	<label for="contactWechat">微信：</label>
	<input type="text" name="contactWechat" id="contactWechat"><br/>
	<label for="contactEmail">邮箱：</label>
	<input type="text" name="contactEmail" id="contactEmail"><br/>
	<label for="contactOther">其他：</label>
	<input type="text" name="contactOther" id="contactOther"><br/><br/>

	<label for="description">学生简介：</label><br/>
	<textarea name="description" id="description" rows="5" cols="60"></textarea>
	</form>
</div>


<div id="detailsDialog" title="学生信息和资助记录" class="dialog" style="display:none;">
<div id="studentInfo"></div>
<h4>资助记录</h4>
<table id="aidTable" class="simpleDataGrid">
<thead>
<tr><th>学期</th><th>学校</th><th>年级</th><th>资助状态</th><th>金额</th><th>收据</th><th>小结</th><th>资助人</th><th>备注</th>
</tr></thead>
<tbody></tbody>
</table>
<input type="button" id="btnAddAidRecord" value="添加资助记录"/>
</div>

<div id="aidDialog" title="增加资助记录" style="display:none;">
	<br/>
	<label>学生：</label>
	<input type="text" readonly="readonly" id="studentBrief"/>
	<input id="project" type="hidden"/><input id="studentId" type="hidden"/>
	<br/>
	<label>学期：</label>
	<select id="semester"></select><br/>
	<label>学校：</label>
	<input type="text" id="school" value="" /><br/>
	<label>年级：</label>
	<select id="grade"></select><br/>
	<label for="aidAmount">资助金额：</label>
	<input type="text" name="aidAmount" id="aidAmount">（每学期）<br/>
	<label for="aidStatus">资助状态：</label>
	<select name="aidStatus" id="aidStatus"></select><br/>
	<label for="aidType">资助类型：</label>
	<select name="aidType" id="aidType"></select><br/>
	<label for="pairStatus">募捐进展：</label>
	<select name="pairStatus" id="pairStatus"></select><br/>
	<label for="sponsorId">资助人：</label>
	<select name="sponsorId" id="sponsorId">
		<option value="0">无结对资助人</option>
	</select><br/>
	<label for="volunteerId">志愿者：</label>
	<select name="volunteerId" id="volunteerId">
		<option value="0">待定</option>
	</select><br/>
	<label for="remark">备注：</label>
	<input type="text" name="remark" id="remark" size="36"><br/>
</div>

<script type="text/javascript" src="<%=request.getContextPath() %>/js/aid/student_list.js"></script>

</div>
</div>
<%@ include file="../common/_page_footer.jsp" %>
</body>
</html>